package com.woniuxy.entity;

/**
 * @author 猪猪
 * @create 2021-10-02 19:57
 */
public class Emp {
    private Integer eid;
    private String ename;
    //对一：一个员工属于一个部门
    //在表中是外键，在实体类中定义成主表对应的实体类对象
    private Dep dep;

    public Emp() {
    }

    public Emp(Integer eid, String ename, Dep dep) {
        this.eid = eid;
        this.ename = ename;
        this.dep = dep;
    }

    public Integer getEid() {
        return eid;
    }

    public String getEname() {
        return ename;
    }

    public Dep getDep() {
        return dep;
    }

    public void setEid(Integer eid) {
        this.eid = eid;
    }

    public void setEname(String ename) {
        this.ename = ename;
    }

    public void setDep(Dep dep) {
        this.dep = dep;
    }

    @Override
    public String toString() {
        return "Emp{" +
                "eid=" + eid +
                ", ename='" + ename + '\'' +
                ", dep=" + dep +
                '}';
    }
}
